<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title>配送企业</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
							
    <section class="content-header">
        <h1>查看采购计划</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">查看采购计划</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="form-inline">
                    <div class="form-group form-group-xs">
                        <label for="searchProjCode">项目编码:</label>
                        <input class="form-control" type="text" id="searchProjCode" placeholder="项目编码" maxlength="18" />
                    </div>
                    <div class="form-group form-group-xs">
                        <label for="searchName">项目名称:</label>
                        <input class="form-control" type="text" id="searchName" placeholder="项目名称" maxlength="127" />
                    </div>
                    
                    <button type="button" class="btn btn-success btn-sm" onclick="search();">查询</button>
                </div>
            </div>
        </div>
        
        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        
        <div class=" box box-warning bottongroup">
        </div>
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">

    	function search(page) {
    		
    		var searchProjCode = $("#searchProjCode").val();
    		var searchName = $("#searchName").val();
    		
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{"projCode":searchProjCode, "name":searchName},
    	        page : (page || 1)
    	    }).trigger("reloadGrid"); //重新载入  
    	}
    
        $(function () {
            
            $("#gridlist").jqGrid({
                url: "getProjDataList.html",
                mtype: "post",
                datatype: "json",
                postData: {"projId" : "${projId}"},
                autowidth: true,
                height: 270,
                colNames: [
					'项目编码', 
					'项目名称',
					'项目类型',
					'已申报药品数', 
					'已申报医疗机构数'
                ],
                colModel: [
                    { name: 'projCode', width: 10, align:"center", sortable: false},
                    { name: 'name', width: 10, align:"center", sortable: false },
                    { name: 'projCat', width: 10, align:"center", sortable: false},
                    { name: '', width: 10, align:"center", sortable: false},
                    { name: '', width: 10, align:"center", sortable: false}
                ],
                rowNum: 10,
                rowList: [10, 20, 30],
                rownumbers: true,
                pager: "#gridpage",
                multiselect: true, 
                viewrecords: true,
                caption: "查看采购计划",
                jsonReader: {
                    id: "projId"
                }
            });
            
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });
    </script>
</body>
</html>



